﻿using System.Xml.Serialization;
using MediaBot.Entities;

namespace RakutenCrawler.ConfigClass
{
    [XmlRoot("config")]
    public class ProductsConfig
    {
        [XmlElement("products")]
        public Products Products;

        [XmlElement("productDetail")]
        public ProductDetail ProductDetail;
    }

    public class Products
    {
        [XmlElement("productNode")]
        public MatchType ProductNode;
        [XmlElement("productName")]
        public MatchType ProductName;
        [XmlElement("productUrl")]
        public MatchType ProductUrl;
        [XmlElement("manufacturerName")]
        public MatchType ManufacturerName;
        [XmlElement("manufacturerUrl")]
        public MatchType ManufacturerUrl;
        [XmlElement("price")]
        public MatchType Price;
        [XmlElement("thumbnailImage")]
        public MatchType ThumbnailImage;
        [XmlElement("averageRating")]
        public MatchType AverageRating;
        [XmlElement("releasedDate")]
        public MatchType ReleasedDate;
        [XmlElement("shortDescription")]
        public MatchType ShortDescription;
        [XmlElement("shopName")]
        public MatchType ShopName;
        [XmlElement("shopUrl")]
        public MatchType ShopUrl;

        [XmlElement("nextPage")]
        public MatchType NextPage;
    }

    public class ProductDetail
    {
        [XmlElement("productDetailNode")]
        public MatchType ProductDetailNode;
        [XmlElement("price")]
        public MatchType Price;
        [XmlElement("averageRating")]
        public MatchType AverageRating;
        [XmlElement("releasedDate")]
        public MatchType ReleasedDate;
        [XmlElement("manufacturerName")]
        public MatchType ManufacturerName;
        [XmlElement("manufacturerUrl")]
        public MatchType ManufacturerUrl;
        [XmlElement("detailDescription")]
        public MatchType DetailDescription;
        [XmlElement("shopName")]
        public MatchType ShopName;
        [XmlElement("shopUrl")]
        public MatchType ShopUrl;
    }
}
